#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int My_strcmp(char* arr1, char* arr2)
{
	while (*arr1 == *arr2)
	{
		if (*arr1 == '\0')
		{
			return 0;
		}
		arr1++;
		arr2++;
	}
	if (*arr1 > *arr2)
	{
		return 1;
	}
	else if (*arr2 > *arr1)
	{
		return -1;
	}
}

char* Max_c(char* arr1, char* arr2, char* arr3)
{
	if (My_strcmp(arr1, arr2) == 1 && My_strcmp(arr1, arr3) == 1)
	{
		return arr1;
	}
	else if (My_strcmp(arr2, arr1) == 1 && strcmp(arr2, arr3) == 1)
	{
		return arr2;
	}
	else if (My_strcmp(arr3, arr1) == 1 && My_strcmp(arr3, arr2) == 1)
	{
		return arr3;
	}
}
int main()
{
	char arr1[100] = "0";
	char arr2[100] = "0";
	char arr3[100] = "0";

	scanf("%s", arr1);
	scanf("%s", arr2);
	scanf("%s", arr3);
	
	printf("%s\n",Max_c(arr1,arr2,arr3));

	return 0;
}